VERSION 5.00
Begin VB.Form frmRunSQL 
   Caption         =   "Run a SQL"
   ClientHeight    =   5400
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   7665
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   5400
   ScaleWidth      =   7665
   Begin VB.CommandButton cmdRun 
      Caption         =   "Run"
      Height          =   735
      Left            =   3720
      TabIndex        =   1
      Top             =   3960
      Width           =   3015
   End
   Begin VB.TextBox txtSQL 
      Appearance      =   0  'Flat
      Height          =   3015
      Left            =   720
      TabIndex        =   0
      Top             =   480
      Width           =   6015
   End
End
Attribute VB_Name = "frmRunSQL"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdRun_Click()
    Dim sql As String
    Dim cn As New ADODB.Connection
    Dim rs As New ADODB.Recordset
    
    sql = Trim(txtSQL.Text)
    Call Cn2Oversea(cn)
    Call CloseRecordSet(rs)
    OperateDatabase rs, cn, sql
    MsgBox "Done !", vbOKOnly, SOFT_TITLE
    
    
End Sub

Private Sub CloseRecordSet(ByRef rs As ADODB.Recordset)
On Error GoTo NoErr
        rs.Close
NoErr:
End Sub
